import request from '@/plugin/axios'

// 获取列表
export function getorglist(params) {
    return request({
        url: '/upms/org/list',
        method: 'get',
        params: request.adornParams(params)
    })
}
// 查询当前用户集团下的组织字典
export function getorglistdict() {
    return request({
        url: '/upms/org/dict',
        method: 'get',
        params: request.adornParams({})
    })
}
// 获取列表树
export function getorgtree(params) {
    return request({
        url: '/upms/org/tree',
        method: 'get',
        params: request.adornParams(params)
    })
}
// 获取信息
export function getorginfo(id) {
    return request({
        url: '/upms/org/info/' + id,
        method: 'get',
        params: request.adornParams({})
    })
}

// 添加
export function addorg(data) {
    return request({
        url: '/upms/org/save',
        method: 'post',
        data
    })
}

// 修改
export function updateorg(data) {
    return request({
        url: '/upms/org/update',
        method: 'put',
        data
    })
}

// 批量删除
export function delBatchorg(params) {
    return request({
        url: '/upms/org/delete',
        method: 'delete',
        data: request.adornData(params, false)
    })
}

// 删除
export function delorg(id) {
    return request({
        url: '/upms/org/delete/' + id,
        method: 'delete',
    })
}